﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BaseData.Domain
{
    /// <summary>
    /// 用户表
    /// </summary>
    public class Users:BaseEneity
    {
        /// <summary>
        /// ID编号
        /// </summary>
        [Key]

        public int UsersId {  get; set; }
        /// <summary>
        /// 账号
        /// </summary>
        public string? Account {  get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string? UserName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string? Password { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string? Phone {  get; set; }
        /// <summary>
        /// 会员等级
        /// 普通，黄金，白金，钻石会员
        /// </summary>
        [StringLength(50,ErrorMessage ="会员等级长度不能超过五十个字符")]
        public string? Level {  get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? BirthDay { get; set; }
        /// <summary>
        /// 性别
        /// 0：男，1：女，2：保密
        /// </summary>
        public int Sex {  get; set; }
        /// <summary>
        /// 订单记录
        /// </summary>
        public int OrderRecord { get; set; } = 0;
        /// <summary>
        /// 消费金额
        /// </summary>
        public decimal OrderPrice { get; set; } = 0;
        /// <summary>
        /// 可用积分
        /// </summary>
        public int Points {  get; set; } = 1000;
        /// <summary>
        /// 用户标签【活跃用户，沉睡用户，流失用户】
        /// </summary>
        public string? UserTitle {  get; set; }
        /// <summary>
        /// 注册渠道
        /// app,网站，小程序，其他渠道
        /// </summary>
        public string? Channel {  get; set; }
        /// <summary>
        /// 用户状态
        /// true:正常，false：不正常
        /// </summary>
        public bool State { get; set; } = true;
    }
}
